<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>最具创意年货大比拼</title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.css" />
  <link rel="stylesheet" type="text/css" href="{$resource_basic}/css/webapp.css" />
  <script type="text/javascript" src="{$resource_basic}/js/jquery.min.js"></script>
  <script type="text/javascript" src="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.js"></script>
  
  <style>
      body{
          background-color:  #fefefe;
      }
      .blend-panel{background-color: #fafcfb;}
      .blend-picture-full img{
          margin: 0;
      }
      .top_create_bg{
          background-image: url("{$resource_basic}img/vote/index_top_bg.jpg");
          height: 8rem;
          width: 100%;
          background-size:contain;
      }
      .top_create_bg [class*=blend-col-]{
          background-color:#ffea01;
          border: none;
      }
      
      .top_create_bg [class*=blend-col-4]{
          background-color:#ffea01;
          border: none;
          color: #f9493c;
          text-align: center;
          font-size: 1.6rem;
      }
      
      .bottom_create_bg{
          background-color: #fefefe;
      }
      
      .bottom_create_bg [class*=blend-col-]{
          background-color: #fefefe;
          border: none;
      }
      
      
      
      
      .create_vote_option [class*=blend-col-4]{
          background-color:#fefefe;
          border: none;
          color: #404040;
          text-align: center;
          font-size: 2rem;
      }
      
      .create_vote_option [class*=blend-col-8]{
          background-color:#fefefe;
          border: none;
          color: #404040;
          text-align: left;
          font-size: 1.6rem;
      }
      
      
      .create_option_btn,.create_option_btn:focus,.create_option_btn:hover{
          background-color: #f9493c;
          border-radius: 10px;
          border: none;
          box-shadow: 1px 3px 2px 1px #A30001;
      }
      
      .blend-suggest-input-gray .blend-suggest-ico{
          background-color: #ff756B;
      }
      .blend-suggest-input-gray input{
          background-color: #fafcfb;
      }
      .blend-suggest-input-gray{
          border-color: #ff756B;
          border-radius:5px;
      }
      .btn_show,.btn_show:focus,.btn_show:active,.btn_show:hover
      {
          background-color: #ff756b;
          border: none;
          color: #fff;
      }
      
      .btn_show_foucus,.btn_show_foucus:focus,btn_show_foucus:active,.btn_show_foucus:hover
      {
          background-color: #f9493c;
      }
      .blend-dialog{
          width: 280px;
          top:40%;
      }
      
      #cover{display:none;position:absolute;left:0;top:0;z-index:18888;background-color:#000000;opacity:0.7;}

      #guide{display:none;position:absolute;right:18px;top:5px;z-index:19999;}

      #guide img{width:100%;height:100%;}


  </style>
</head>

<body>
    <!--头部图片-->
    <figure class="blend-picture blend-picture-full ">
       <img src="{$resource_basic}img/vote/index_banner.jpg"> 
    </figure>
    
    <div style="height:15px;"></div>
    
    
    <div class="blend-panel" style="width:90%; background-color:#ff9d96; margin: auto; border: none; font-size: 2rem; ">
        <div class="blend-panel-header blend-panel-left" style=" border: none; color: #fff;font-size: 2rem;">
            {$result.id}号 <span style=" float: right;">第{$result.rank}名/共计<span id="vote_count">{$result.vote_count}</span>票</span>
        </div>
        <div class="blend-panel-body" style=" border: none;color: #fff;font-size: 1.8rem;">
            <div>
                <img src="{$result.avatar}" style=" width: 50px; height: 50px; border-radius: 100%;"/>  {$result.username}
            </div>
            <br/>
            <span>推荐理由:</span>
            {$result.content}
            
            <volist name="result.thumb_list" id="vo">
                <br/><br/>
                <img src="{$vo}"  style=" width: 100%;"/>
                
            </volist>
        </div>
        
    </div>
    
    
    
   
   
   
   

   <!--提交参赛作品-->
    
   
   <div class="blend-grid blend-container-fluid bottom_create_bg">
       <div class="blend-row">
           <span class="blend-col-2"></span>
           <span class="blend-col-8">
               <button class="blend-button blend-button-primary blend-button-large create_option_btn" id="vote_it">投Ta一票</button>
           </span>
           <span class="blend-col-2"></span>
       </div>
       <br/>
       <div class="blend-row">
           <span class="blend-col-2"></span>
           <span class="blend-col-8">
               <button id="create_option_chk" class="blend-button blend-button-primary blend-button-large create_option_btn">我也要参赛</button>
           </span>
           <span class="blend-col-2"></span>
       </div>
       <br/>
       <div class="blend-row">
           <span class="blend-col-2"></span>
           <span class="blend-col-8">
               <a href="{:U('M/Vote/index')}" class="blend-button blend-button-primary blend-button-large create_option_btn">点击查看更多</a>
           </span>
           <span class="blend-col-2"></span>
       </div>
   </div>
   
<!--   <div class="blend-panel">
        <div class="blend-panel-header blend-panel-left">
            精彩评论 <span style="float:right; color: #03ab9e;" id='add_commnet'> + 我来说两句</span>
        </div>
        
        
    </div>-->

   
   <!--活动介绍-->
   <figure class="blend-picture blend-picture-full ">
       <img src="{$resource_basic}img/vote/test.jpg"> 
    </figure>
   
    
    
<!--    <div class="blend-panel">
        <div class="blend-panel-header blend-panel-left">
            精彩评论 <span style="float:right; color: #03ab9e;" id='add_commnet'> + 我来说两句</span>
        </div>
        
        
    </div>-->
   
   
    <div id="customDialog" class="blend-dialog" style="background-color: #FE746A;">
        
    </div>


   <div id="customDialogfocus" class="blend-dialog" style="background-color: #FE746A;">
        <div class="blend-grid blend-container-fluid" style="margin-top:20px; background-color: #FE746A;">
            <div class="" style=" margin-top:10px; margin-bottom:10px; text-align: center; font-size: 1.5rem; color: #fff;">
                长按下方图片，点击识别二维码
            </div>
            <img id="customDialog_for_focus" src="{$result.qrcode_url}" style=" width: 100%;"/>
            <div class="" style=" margin-top:10px; margin-bottom:10px; text-align: center; font-size: 1.5rem;color: #fff;">
                关注并进入公众号后，<br/>就可以为好友投票或者进行参赛啦~
            </div>  
        </div>
    </div>

    <div id="customDialogNianhuo" class="blend-dialog" style="background-color: #FE746A;">
        <div class="blend-grid blend-container-fluid" style="margin-top:20px; background-color: #FE746A;">
            <div class="" style=" margin-top:10px; margin-bottom:10px; text-align: center; font-size: 1.5rem; color: #fff;">
                长按下方图片，点击识别二维码
            </div>
            <img src="/Public/template/default/img/vote/showqrcode_nianhuo2.jpeg" style=" width: 100%;"/>
            <div class="" style=" margin-top:10px; margin-bottom:10px; text-align: center; font-size: 1.5rem;color: #fff;">
                关注并进入公众号后，<br/>就可以进行参赛啦~
            </div>  
        </div>
    </div>

 <!--投票成功分享的弹层-->
<!-- <div id="customDialog1" style="display:none; ">
     <div  style="background-color: #000; opacity: 0.7; z-index: 18888; position: absolute; top:1px; height: 100%; width: 100%;">
    </div>
     <div style=" z-index: 19999; display: block; position: absolute; top: 1px;">  
     <img id="customDialog_for_share" src="/Public/template/default//img/vote/share_bg_01.png" style=" width: 100%;"/>
     </div>   
 </div>-->
    
 
 <!--已经投票的分享弹层-->
 
<!--  <div id="customDialog2" style="display:none; ">
     <div  style="background-color: #000; opacity: 0.7; z-index: 18888; position: absolute; top:1px; height: 100%; width: 100%;">
    </div>
     <div style=" z-index: 19999; display: block; position: absolute; top: 1px;">  
     <img id="customDialog_for_share" src="/Public/template/default//img/vote/share_bg_02.png" style=" width: 100%;"/>
     </div>   
 </div>-->
 
 
 <div id="cover"></div>

<div id="guide"><img id="customDialog_for_share" src="/Public/template/default/img/vote/share_bg_03.png"></div>


 
   
   
<!--底部菜单-->
<div style=" height: 60px;"></div>
<div class="footer_nav">
    <nav data-blend-widget="tabnav" class="blend-tabnav" style="margin-bottom: 0px; bottom: 0px; position: absolute; width: 100%; height: 50px; border-top: #b2b2b2 1px solid;">
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('M/Vote/index')}" style="height:50px;">
            <img src="{$resource_basic}/img/vote/index01.png" style=" height: 50%;margin-top: 5px;"/>
                <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px;font-size: 12px; color: #777">
                     首页
                </span>
        </a>
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('M/Vote/ranks',array('state'=>1))}" style="height:50px;">
                     <img src="{$resource_basic}/img/vote/index02.png" style=" height: 50%;margin-top: 5px;"/>
                    <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px;font-size: 12px; color: #777;">
                     排名
                </span>
        </a>
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('M/Vote/create')}" style="height:50px;">
                     <img src="{$resource_basic}/img/vote/index03.png" style=" height: 50%;margin-top: 5px;"/>
                     <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px; font-size: 12px; color: #777;">
                     报名
                </span>
        </a>
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('M/Vote/steps')}" style="height:50px;">
                     <img src="{$resource_basic}/img/vote/index04.png" style=" height: 50%;margin-top: 5px;"/>
                     <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px; font-size: 12px; color: #777;">
                     得奖攻略
                </span>
        </a>


     </nav>
</div>
    <!--底部菜单end-->
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
//分享

wx.config({
    debug: false,
    appId: '{$signPackage["appId"]}',
    timestamp: {$signPackage["timestamp"]},
    nonceStr: '{$signPackage["nonceStr"]}',
    signature: '{$signPackage["signature"]}',
    jsApiList: [
      // 所有要调用的 API 都要加到这个列表中
      'onMenuShareTimeline',
      'onMenuShareAppMessage'
    ]
});


wx.ready(function () {
// 在这里调用 API
    wx.onMenuShareTimeline({
        title: '不求Mini4,不求Iphone6,只想要500元购物卡，投我一票吧!', // 分享标题
        desc: '', // 分享描述
        link: "{$site_url}{:U('M/Vote/vote_detail')}"+"?vid="+{$result.id}, // 分享链接
        imgUrl: 'http://www.zhongcetianxia.com/Public/template/default/img/vote/share_ico.jpg', // 分享图标
        success: function () { 
            // 用户确认分享后执行的回调函数，生成红包
            _system.$("cover").click()

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });
    
    wx.onMenuShareAppMessage({
        title: '我要他们的Iphone6，投我一票吧！', // 分享标题
        desc: '年货创意比赛，晒红包、晒房子、晒女友、晒坚果、晒茅台', // 分享描述
        link: "{$site_url}{:U('M/Vote/vote_detail')}"+"?vid="+{$result.id}, // 分享链接
        imgUrl: 'http://www.zhongcetianxia.com/Public/template/default/img/vote/share_ico.jpg', // 分享图标
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () { 
            // 用户确认分享后执行的回调函数
            _system.$("cover").click()

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });

});

</script>

<script>
    $(function(){
        $("#vote_it").bind('click',function(){
             open_loading();
             $.ajax({ 
                   type: 'GET', 
                   url: '{:U("M/Vote/vote_it")}', 
                   dataType: 'json', 
                   data:"ip={$ip}&vid="+{$result.id}+"$vsid={$result.vsid}",
                   cache: false, 
                   error: function(){ 
                       return false; 
                   }, 
                   success:function(json){ 
                       close_loading();
                        if(json.err===1)
                        {
//                            重复投票
//                            alert(json.content);

//                            $("#customDialog1").show();
                            $("#customDialog_for_share").attr("src",json.content);
                            _system._guide(true);
                            
                        }
                        else if(json.err===2)
                        {
//                            $("#customDialog_for_focus").attr("src",json.content);
                            $("#customDialogfocus").dialog("show");
                            
                        }
                        else if(json.err===9)
                        {
//                            $("#customDialog_for_focus").attr("src",json.content);
                            alert(json.content);
                            $("#customDialog_for_share").attr("src",json.content);
                            
                        }
                        else if(json.err===10)
                        {
                            alert(json.content);
                            
                        }
                        else
                        {
//                           alert("投票成功！");
//                           $("#customDialog2").show();

                            var vote_count = parseInt($("#vote_count").text());
                            vote_count++;
                            $("#vote_count").text(vote_count);
                            $("#customDialog_for_share").attr("src",json.content);
                            _system._guide(true);
                        }
                        
                        
                        
                   } 
               });
               
            
        });
        
        $("#create_option_chk").bind('click',function(){
             open_loading();
             $.ajax({ 
                   type: 'GET', 
                   url: '{:U("M/Vote/get_member_status")}', 
                   dataType: 'json', 
                   data:"vid="+{$result.id},
                   cache: false, 
                   error: function(){ 
                       return false; 
                   }, 
                   success:function(json){ 
                       close_loading();
//                       alert(json);
                       if(json===1)
                       {
                           window.location.href="{:U('M/Vote/create')}";
                       }
                       else
                       {
                           $("#customDialogNianhuo").dialog("show");
                       }

                   } 
               });
               
            
        });
        
        $("#guide").click(function(){
            _system.$("cover").click();
        });
        
        $("#cover").click(function(){
            _system.$("cover").click();
        });
        
        
        /*
         * 判断是否要进入页面弹层
         * 
         */
        var promotion = {$promotion};
        if(promotion==1)
        {
            _system._guide(true);
        }

    
    });
    
//     $("#customDialog").dialog({
//        maskTapClose:true,
//        renderType:2
//    });
    
    $("#customDialogfocus").dialog({
        maskTapClose:true,
        renderType:2
    });
    
    $("#customDialogNianhuo").dialog({
        maskTapClose:true,
        renderType:2
    });
    
    $("#customDialog").dialog({
        maskTapClose:true,
        renderType:2
    });
//    $("#customDialog").dialog("show");
//    console.log("show");
    
   
    
    
    function open_loading()
    {
        var loading = $.blend.loading();
        loading.show();
    }
    
    function close_loading()
    {
        $('.blend-loading').hide();
    }
    // 加载的loading...
// document.onreadystatechange = subSomething;//当页面加载状态改变的时候执行这个方法. 
//    function subSomething() 
//    { 
//        if(document.readyState === "complete") //当页面加载状态 
//        {
////            $(".blend-dialog").dialog("hide");
//            $(".blend-dialog-mask").hide();
//             console.log("hide");
//
//        }
//    }
    

</script>
<script type="text/javascript">

    var _system={

        $:function(id){return document.getElementById(id);},

   _client:function(){

      return {w:document.documentElement.scrollWidth,h:document.documentElement.scrollHeight,bw:document.documentElement.clientWidth,bh:document.documentElement.clientHeight};

   },

   _scroll:function(){

      return {x:document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,y:document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop};

   },

   _cover:function(show){

      if(show){

     this.$("cover").style.display="block";

     this.$("cover").style.width=(this._client().bw>this._client().w?this._client().bw:this._client().w)+"px";

     this.$("cover").style.height=(this._client().bh>this._client().h?this._client().bh:this._client().h)+"px";

  }else{

     this.$("cover").style.display="none";

  }

   },

   _guide:function(click){

      this._cover(true);

      this.$("guide").style.display="block";

      this.$("guide").style.top=(_system._scroll().y+5)+"px";

      window.onresize=function(){_system._cover(true);_system.$("guide").style.top=(_system._scroll().y+5)+"px";};

  if(click){_system.$("cover").onclick=function(){

         _system._cover();

         _system.$("guide").style.display="none";

 _system.$("cover").onclick=null;

 window.onresize=null;

  };}

   },

   _zero:function(n){

      return n<0?0:n;

   }

}

</script>
<?php require_once 'cs.php';echo '<img src="'._cnzzTrackPageView(1256622573).'" width="0" height="0"/>';?>
<include file="Index/foot_analyze"/>
</body>
</html>